package distrcomp;

import java.io.Serializable;

/*
 * Product class
 */

public class Product implements Serializable {
	private static final long serialVersionUID = 1L;
	private String name;
	private double value = 0;
	private String cur; //Currency
	private boolean hazardous = false;
	private int width = 0; //in mm
	private int height = 0; //in mm
	private int depth = 0; //in mm
	private int weight = 0; //in g
	
	public Product(String name, double value, String cur, boolean hazardous, int width, int height, int depth, int weight) {
		this.name = name;
		this.value = value;
		this.cur = cur;
		this.hazardous = hazardous;
		this.width = width;
		this.height = height;
		this.depth = depth;
		this.weight = weight;
	}
	
	public void print() {
		System.out.println("Name: " + this.name);
		System.out.println("Value: " + this.value + " " + this.cur);
		System.out.println("Dimensions: " + this.width + "x" + this.height + "x" + this.depth + "mm");
		System.out.println("Weight: " + this.weight + "g");
		if(this.hazardous) {
			System.out.println("Hazardous");			
		} else {
			System.out.println("Not hazardous");
		}
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public double getValue() {
		return value;
	}

	public void setValue(double value) {
		this.value = value;
	}

	public String getCur() {
		return cur;
	}

	public void setCur(String cur) {
		this.cur = cur;
	}

	public boolean isHazardous() {
		return hazardous;
	}

	public void setHazardous(boolean hazardous) {
		this.hazardous = hazardous;
	}

	public int getWidth() {
		return width;
	}

	public void setWidth(int width) {
		this.width = width;
	}

	public int getHeight() {
		return height;
	}

	public void setHeight(int height) {
		this.height = height;
	}

	public int getDepth() {
		return depth;
	}

	public void setDepth(int depth) {
		this.depth = depth;
	}

	public int getWeight() {
		return weight;
	}

	public void setWeigth(int weight) {
		this.weight = weight;
	}
}
